package com.syq.job;

import org.quartz.*;

import java.util.Date;

/**
 * @ClassName: HelloJob
 * @Description: TODO
 * @Create by: syq
 * @Date: 2022/7/15 9:55
 */


public class HelloJob implements Job {
    //执行的任务
    @Override
    public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {

        JobDetail jobDetail=jobExecutionContext.getJobDetail();
        JobKey key = jobDetail.getKey();
        System.out.println("==="+key.getName()+"正在执行任务，时间是："+new Date());
    }
}
